Message

Constructors

Link copied to clipboard
constructor(@Nullable text: @Nullable CharSequence, timestamp: Long, @Nullable person: @Nullable Person)
Creates a new Message with the given text, timestamp, and sender.
constructor(@Nullable text: @Nullable CharSequence, timestamp: Long, @Nullable sender: @Nullable CharSequence)
Constructor

Functions

Link copied to clipboard
@Nullable
open fun getDataMimeType(): @Nullable String
Get the MIME type of the data pointed to by the URI.
Link copied to clipboard
@Nullable
open fun getDataUri(): @Nullable Uri
Get the the Uri pointing to the content of the message.
Link copied to clipboard
@NonNull
open fun getExtras(): @NonNull Bundle
Get the extras Bundle for this message.
Link copied to clipboard
@Nullable
open fun getPerson(): @Nullable Person
Returns the Person sender of this message.
Link copied to clipboard
@Nullable
open fun getSender(): @Nullable CharSequence
Get the text used to display the contact's name in the messaging experience
Link copied to clipboard
@Nullable
open fun getText(): @Nullable CharSequence
Get the text to be used for this message, or the fallback text if a type and content Uri have been set
Link copied to clipboard
open fun getTimestamp(): Long
Get the time at which this message arrived in ms since Unix epoch.
Link copied to clipboard
@NonNull
open fun setData(@Nullable dataMimeType: @Nullable String, @Nullable dataUri: @Nullable Uri): @NonNull NotificationCompat.MessagingStyle.Message
Sets a binary blob of data and an associated MIME type for a message.